package org.corey.voxiverse.layers;

import java.util.Random;

import org.corey.voxiverse.Block;
import org.corey.voxiverse.Block.BlockType;

public class CaveGen {
	public CaveGen(){
		
	}
	
	public static void Generate(Block[][][] Blocks, int CHUNK_SIZE, Random r){
		for (int x = 0; x < CHUNK_SIZE;x++){
			for (int z = 0; z < CHUNK_SIZE; z++){
				for (int y = 4; y < 45; y++){
					
					if (!(x==0) && !(x==CHUNK_SIZE) && !(z ==0) && !(z==CHUNK_SIZE) && !(y==0) && !(y==CHUNK_SIZE)){
						if (Blocks[x][y][z].GetID() == 0){
							Blocks[x-1][y][z] = new Block(BlockType.BlockType_Default);
							Blocks[x-1][y][z-1] = new Block(BlockType.BlockType_Default);
							Blocks[x][y][z-1] = new Block(BlockType.BlockType_Default);
							Blocks[x][y-1][z] = new Block(BlockType.BlockType_Default);
							Blocks[x-1][y-1][z] = new Block(BlockType.BlockType_Default);
							Blocks[x][y-1][z-1] = new Block(BlockType.BlockType_Default);
						}
					}
					
					
					
					
					
					
					
				}
					
				
			}
		}
	}
}
